<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>

    </style>
</head>
<body>
<ul class="demo1">
    <li>0</li>
    <li>2</li>
    <li>4</li>
    <li>6</li>
    <li>8</li>
</ul>
<script src="../jquery-1.12.4.js"></script>
<script>
    $(function () {
       //单个样式
       $(".demo1").css("border","1px solid red");
       //多个样式
        $(".demo1 li").css({
           color:"blue",
            backgroundColor:"gray"
        });
        //获取css样式
        console.log($(".demo1 li").css("color"))
    });
</script>
</body>
</html>